package com.onegroup.controller;

import com.onegroup.common.enums.ResponseStatusEnum;
import com.onegroup.common.exception.MyCustomException;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author:曾雪斌
 * @Description: 测试
 * @History:
 */
@RestController
public class TestController {

    @GetMapping("/test")
//    @PreAuthorize("hasAuthority('test:test111111')")
    @PreAuthorize("hasAnyAuthority('test:test1111', 'test:test')")
    public String testException() throws MyCustomException {
        throw new MyCustomException(ResponseStatusEnum.USER_LOCK);
    }
}
